<?php
$this->title = "Profle - Interests Edit";
$this->headTitle($this->title);
?>	

		
		<!-- start content -->
		<div id="intedit_inside" class="content">
			
		<!--  Glavno meni -->
			<div id="InnerMenu">
				<?php $session = Zend_Registry::get('session');?>
				<ul >
					<li style=" display: inline; "><a href="<?php echo $this->url(array('controller'=>'Profile','action'=>'basic'))."?id=". $this->viewuser; ?>">Basic Info</a></li>
					<li style=" display: inline; "><a href="<?php echo $this->url(array('controller'=>'Profile','action'=>'medical'))."?id=". $this->viewuser; ?>">Medical Info</a></li>					
					<li style=" display: inline; "><a href="<?php echo $this->url(array('controller'=>'Profile','action'=>'Interests'))."?id=". $this->viewuser; ?>">Interests</a></li>					
				</ul>
			</div>
			<form id="form_interests_edit" name="interests" method="post">
				<div id="div_EditArea">
					<div id="div_PermisionsBasic">
						<?php if ($session->user['id'] == $this->Query){?>					
							<label for="Permisions">Permitions</label><br>
							<input type="radio" name="rbl_permitions" value="1" <?php $permitions =(int)$this->interestsInfo['ViewPermitions'];if ($permitions ==1){  ?> checked="checked" <?php } ?> ><label for="Only_me">Only Me</label> 
							<input type="radio" name="rbl_permitions" value="2" <?php $permitions =(int)$this->interestsInfo['ViewPermitions'];if ($permitions ==2){  ?> checked="checked" <?php } ?>><label for="Doctors">Doctors</label>
							<input type="radio" name="rbl_permitions" value="3" <?php $permitions =(int)$this->interestsInfo['ViewPermitions'];if ($permitions ==3){  ?> checked="checked" <?php } ?>><label for="Friends_and_Doctors">Friends and Doctors</label> 
							<input type="radio" name="rbl_permitions" value="4" <?php $permitions =(int)$this->interestsInfo['ViewPermitions'];if ($permitions ==4){  ?> checked="checked" <?php } ?>><label for="All">All</label> 
						<?php }?> 
					</div>	
					<label for="Work">Work: </label><textarea id="txt_Work" name="txt_Work" rows="3" cols="50" title="Work" ><?php echo $this->interestsInfo['Work'];?></textarea><br/>
					<label for="Music">Music: </label><textarea id="txt_Music" name="txt_Music" rows="3" cols="50" title="Music" ><?php echo $this->interestsInfo['Music'];?></textarea><br/>
					<div id="sports" style="width: 30%;">
					<?php if ($this->flag_sports == 0){?>
						<label for="SportsPlaying:">Sports Playing: None</label><br/>
						<input type="button" value="Add Sport" id="btn_AddSport" name="btn_AddSport"/>		
					<?php }
					else{ ?>
					
						<label for="SportsPlaying:">Sports Playing:</label><br/>
						<table id="hor-minimalist-a">
						<thead>
						<tr>
							<th>Name</th>
						    <th>&nbsp;</th>
						</tr>
						</thead>
						<tbody>
						<?php foreach($this->sports as $sport) : ?>
						  <tr>
						    <td><?php echo $sport['Name']; ?></td>
						    <td><img alt="<?php echo $sport['id']; ?>" src="/med-advisor/application/layouts/scripts/css/Pictures/close.png" id="pic_delete" class="deleteSport"> </td>
						  </tr>
						<?php endforeach; ?>							
						</tbody>
						</table>
						<?php if ($this->flag_sportsAdd == 1){ ?>
							<input type="button" value="Add Sport" id="btn_AddSport" name="btn_AddSport"/>		
						<?php }?>			
					<?php }?>
					</div>
					<input type="submit" value="Save" id="btn_SaveEdit" name="btn_SaveEdit"/>
				</div>
			</form>
		</div>
		
		<div id="pop_upInterests">
			<form id="form_AddSport" name="AddSport" method="post">			
					<label for="Sports">Sports avaliable: </label>
							<?php if ($this->flag_sportsAdd == 0){ ?>
								<label for="NoneSport">/</label>
								<input type="Button" value="Exit" id="btn_ExitAddSportPopUp"  name="btn_ExitAddSportPopUp"/>							
							<?php } else{?>
							<select name="ddl_Sports" id="ddl_Sports">
								<?php foreach($this->Sports_Add as $sportAdd){							
									echo "<option value=" . $sportAdd['Sport_id'] ." >".$sportAdd['Name']."</option>\n";								
								}?>						
							</select><br/>
							<input type="submit" value="Save Sport" id="btn_SportSave"  name="btn_SportSave"/>
							<input type="button" name="btn_AddCancelSport" id="btn_AddCancelSport" value="Cancel">
							<?php }?>	
			</form>
		</div>
		
		<div id="pop_upDeleteSport">
			<form id="form_DeleteSport" name="form_DeleteSport" method="post">
				<p>Are you sure that you want to delete this Sport?</p>
				
				<input type="submit" name="btn_DeleteSport" id="btn_DeleteSport" value="Yes">
				<input type="button" name="btn_DeleteCancelSport" id="btn_DeleteCancelSport" value="No">
				<input type="hidden" id="hdn_SportCurrentDelete" name="hdn_SportCurrentDelete" value="">
			</form>
		</div>
		<!-- end content -->

		